import request from '@/utils/request'

// 查询运行网关列表
export function listGateway(query) {
  return request({
    url: '/app/gateway/list',
    method: 'get',
    params: query
  })
}
export function  listAll(){
  return request({
    url: '/app/gateway/all',
    method:'get'
  })
}
// 查询运行网关详细
export function getGateway(gatewayId) {
  return request({
    url: '/app/gateway/' + gatewayId,
    method: 'get'
  })
}

// 新增运行网关
export function addGateway(data) {
  return request({
    url: '/app/gateway',
    method: 'post',
    data: data
  })
}

// 修改运行网关
export function updateGateway(data) {
  return request({
    url: '/app/gateway',
    method: 'put',
    data: data
  })
}

// 删除运行网关
export function delGateway(gatewayId) {
  return request({
    url: '/app/gateway/' + gatewayId,
    method: 'delete'
  })
}

export function allGateway(gatewayId) {
  return request({
    url: '/app/gateway/all/' + gatewayId,
    method: 'get'
  })
}
